package ar.com.fiuba.ElectronicCircuitAnalyst.domain.common;

/**
 * Specificaiton interface.
 * 
 * Use AbstractSpecification as base for creating specifications, and only the method isSatisfiedBy(Object) must be implemented. 
 */
public interface Specification<T> {

	/**
	 * Check if t is satisfied by the specification
	 * @param t Object to test
	 * @return true if t satisfies the specification
	 */
	public Boolean isSatisfiedBy(T t);

//	/**
//	 * Create a new specification that is the OR operation of this specification and another specification. 
//	 * @param specification Specification to OR. 
//	 * @return A new specification.
//	 */
//	public Specification<T> or(Specification<T> specification);
//	
//	/**
//	 * Create a new specification that is the AND operation of this specification and another specification. 
//	 * @param specification Specification to AND. 
//	 * @return A new specification.
//	 */
//	public Specification<T> and(Specification<T> specification);
//	
//	/**
//	 * Create a new specification that is the NOT operation of this specification.
//	 * @param specification Specification to NOT. 
//	 * @return A new specification.
//	 */
//	public Specification<T> not(Specification<T> specification);
}
